package com.timoon.webcomponent.utility.sort;

import java.util.Arrays;

import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.markup.repeater.data.GridView;
import org.apache.wicket.markup.repeater.data.IDataProvider;
import org.apache.wicket.markup.repeater.data.ListDataProvider;

/**
 *<p></p>
 *<p></p>
 *<p>Copyright:Copyright(c)2013.4.1</p>
 *<p>Company:timoon</p>
 *@author 付乐天
 *@version 1.0 */
public class Sort1Panel extends Panel {

	public Sort1Panel(String id) {
		super(id);
		// TODO Auto-generated constructor stub
		
		renderPanel();
	}

	private void renderPanel() {
		// TODO Auto-generated method stub
		
		IDataProvider<String> data=new ListDataProvider<>(Arrays.asList("few","fewaf","fwea","fewfaw"));
		GridView<String> gridView=new GridView<String>("rows",data){

			@Override
			protected void populateEmptyItem(Item<String> arg0) {
				// TODO Auto-generated method stub
				arg0.add(new Cell1Panel("wk_cell"));
			}

			@Override
			protected void populateItem(Item<String> arg0) {
				// TODO Auto-generated method stub
				arg0.add(new Cell1Panel("wk_cell"));
			}
			
		};
		gridView.setColumns(2);
		add(gridView);
	}

}
